//
//  DispatchQueue+Extension.swift
//  NetWork
//
//  Created by Delin Meng 孟德林 on 2018/9/21.
//  Copyright © 2018年 Delin Meng 孟德林. All rights reserved.
//

import Dispatch
import Foundation

extension DispatchQueue {

    static var userInteractive:DispatchQueue {
        return DispatchQueue.global(qos: .userInteractive)
    }

    static var userInitiated:DispatchQueue {
        return DispatchQueue.global(qos: .userInitiated)
    }

    static var utility:DispatchQueue {
        return DispatchQueue.global(qos: .utility)
    }

    static var background:DispatchQueue {
        return DispatchQueue.global(qos: .background)
    }

    /// 延迟操作
    func after(_ delay:TimeInterval,execute closure:@escaping () -> Void) {
        asyncAfter(deadline: .now() + delay, execute: closure)
    }


}
